/* style.css - 全局样式 */
/* 包括根元素、主体样式、背景图等 */

:root {
    --text-color: #e0e0e0;
    --accent-color: #4caf50;
    --card-bg: rgba(40, 40, 40, 0.7);
    --hover-color: rgba(60, 60, 60, 0.8);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: #000;
    min-height: 100vh;
}

.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/images/background.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: -1;
    filter: blur(5px);
}

.container {
    width: 95%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
}

header .header-container,
footer .footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}


.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--accent-color);
}

.search-container {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 5px;
    flex-grow: 1;
    max-width: 600px;
    margin: 0 40px; /* 增加左右边距 */
    width: 100%;
}

.search-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 10px 15px;
    font-size: 16px;
    outline: none;
}

.search-button {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 10px 15px;
    font-size: 18px;
}

.search-button:hover {
    color: var(--accent-color);
}

.top-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* 允许导航项换行 */
}
.nav-item {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.nav-item:hover {
    opacity: 1;
    color: var(--accent-color);
}

.secondary-nav {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; /* 允许导航项换行 */
    background-color: rgba(30, 30, 30, 0.8);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    padding: 10px;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent-color);
}

.bookmark-category {
    margin-bottom: 40px;
}

.bookmark-category h2 {
    color: var(--accent-color);
    font-size: 22px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    display: inline-block;
}

.bookmark-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    width: 95%; /* 设置网格宽度为容器的95% */
    max-width: 1600px; /* 设置最大宽度 */
}


.bookmark-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.bookmark-card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.bookmark-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-decoration: none; /* 移除默认的下划线 */
    display: block; /* 使整个卡片可点击 */
}

.bookmark-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    background-color: var(--hover-color);
}

.bookmark-card-content {
    padding: 20px;
    display: flex;
    align-items: center;
}

.bookmark-card-content h3 {
    font-size: 16px;
    margin: 0;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

.bookmark-card p {
    font-size: 14px;
    color: #aaa;
    margin: 0 0 10px;
    line-height: 1.4;
}

.bookmark-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    object-fit: cover;
}

.bookmark-card:hover .bookmark-card-content h3 {
    color: #ffffff;
}

.bookmark-description {
    font-size: 12px;
    color: #aaa;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.card-content {
    padding: 15px;
}

.card-content h3 {
    font-size: 18px;
    margin: 0 0 10px;
}

.card-content p {
    font-size: 14px;
    color: #aaa;
    margin: 0;
}

.main-content {
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}



footer p {
    color: var(--text-color);
    text-align: center;
}